<?php
/**
 * @property integer $id
 * @property string $created_at
 * @property string $updated_at
 */
class BaseModel extends CActiveRecord
{
    protected function beforeSave()
    {
        if($this->isNewRecord)
        {
            $this->created_at = new CDbExpression('NOW()');
        }
        $this->updated_at = new CDbExpression('NOW()');
        
        return parent::beforeSave();
    }
}